import * as types from '../_types/pageTransition';


interface Istate {
    [key: string]: any
}

export default function pageTransition(state:Istate = {}, action) {
    const {type, payload} = action;
    switch(type) {
        case types.SET_SCAN_PAGE_FROM: {
            return {
                ...state,
                scanPageFrom: payload
            }
        }
        case types.SET_TRANSACTION_PAGE_FROM: {
            return {
                ...state,
                transactionPageFrom: payload
            }
        }
        default: {
            return state
        }
    }
}